package com.zhongjian.technologycal.mall.bean;

import com.bigkoo.pickerview.model.IPickerViewData;

import java.util.List;

/**
 * Created by Sai on 15/11/22.
 */
public class ProvinceBean implements IPickerViewData {


    /**
     * id : 10
     * provincename : 北京市
     * citys : [{"id":1001,"cityname":"北京市","regions":[{"id":100101,"regionname":"东城区"},{"id":100102,"regionname":"西城区"},{"id":100105,"regionname":"朝阳区"},{"id":100106,"regionname":"海淀区"},{"id":100107,"regionname":"丰台区"},{"id":100108,"regionname":"石景山区"},{"id":100109,"regionname":"顺义区"},{"id":100110,"regionname":"昌平区"},{"id":100111,"regionname":"门头沟区"},{"id":100112,"regionname":"通州区"},{"id":100113,"regionname":"房山区"},{"id":100114,"regionname":"大兴区"},{"id":100115,"regionname":"延庆县"},{"id":100116,"regionname":"怀柔区"},{"id":100117,"regionname":"平谷区"},{"id":100118,"regionname":"密云县"},{"id":100119,"regionname":"亦庄开发区"}]}]
     */

    private int id;
    private String provincename;
    private List<CitysBean> citys;
    // 实现 IPickerViewData 接口，
    // 这个用来显示在PickerView上面的字符串，
    // PickerView会通过IPickerViewData获取getPickerViewText方法显示出来。
    @Override
    public String getPickerViewText() {
        return this.provincename;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getProvincename() {
        return provincename;
    }

    public void setProvincename(String provincename) {
        this.provincename = provincename;
    }

    public List<CitysBean> getCitys() {
        return citys;
    }

    public void setCitys(List<CitysBean> citys) {
        this.citys = citys;
    }

    public static class CitysBean {
        /**
         * id : 1001
         * cityname : 北京市
         * regions : [{"id":100101,"regionname":"东城区"},{"id":100102,"regionname":"西城区"},{"id":100105,"regionname":"朝阳区"},{"id":100106,"regionname":"海淀区"},{"id":100107,"regionname":"丰台区"},{"id":100108,"regionname":"石景山区"},{"id":100109,"regionname":"顺义区"},{"id":100110,"regionname":"昌平区"},{"id":100111,"regionname":"门头沟区"},{"id":100112,"regionname":"通州区"},{"id":100113,"regionname":"房山区"},{"id":100114,"regionname":"大兴区"},{"id":100115,"regionname":"延庆县"},{"id":100116,"regionname":"怀柔区"},{"id":100117,"regionname":"平谷区"},{"id":100118,"regionname":"密云县"},{"id":100119,"regionname":"亦庄开发区"}]
         */

        private int id;
        private String cityname;
        private List<RegionsBean> regions;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getCityname() {
            return cityname;
        }

        public void setCityname(String cityname) {
            this.cityname = cityname;
        }

        public List<RegionsBean> getRegions() {
            return regions;
        }

        public void setRegions(List<RegionsBean> regions) {
            this.regions = regions;
        }

        public static class RegionsBean {
            /**
             * id : 100101
             * regionname : 东城区
             */

            private int id;
            private String regionname;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getRegionname() {
                return regionname;
            }

            public void setRegionname(String regionname) {
                this.regionname = regionname;
            }
        }
    }
}
